﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeBehind="StoreManage.aspx.cs" Inherits="XinBang.Web.Admin.StoreManage" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headerplace" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainplace" runat="server">
<h2><asp:Literal ID="ttitle" runat="server" Text="库存管理"></asp:Literal></h2>
<asp:MultiView ID="MultiView1" runat="server">
    <asp:View ID="View1" runat="server">
        <div class="show">
            <asp:Label ID="goodsNameLabel" runat="server" Text="Label"></asp:Label>
        </div>
        <div class="show">
            <asp:LinkButton ID="addstore" runat="server" OnClick="addstore_Click">添加进货记录</asp:LinkButton>
        </div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            CssClass="show" DataSourceID="ObjectDataSource2" PageSize="20" DataKeyNames="Stoid" OnSelectedIndexChanged="BindStoreRecord">
            <Columns>
                <asp:BoundField DataField="Stoid" HeaderText="入库编号" SortExpression="Stoid" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Pubtime" HeaderText="进库时间" ReadOnly="True" SortExpression="Pubtime" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Price" HeaderText="进库价格" ReadOnly="True"  SortExpression="Price" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Rulid" HeaderText="卖价规则" ReadOnly="True"  SortExpression="Rulid" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Amount" HeaderText="数量" ReadOnly="True"  SortExpression="Amount" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Remain" HeaderText="当前剩余" ReadOnly="True"  SortExpression="Remain" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:CommandField HeaderText="操作" SelectText="编辑销售价格" ShowSelectButton="True">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:CommandField>
            </Columns>
            <AlternatingRowStyle CssClass="alt" />
            <PagerStyle CssClass="pager" />
            <PagerSettings FirstPageText="首页" LastPageText="末页" Mode="NextPreviousFirstLast"
                    NextPageText="下一页" PreviousPageText="上一页" />
            <EmptyDataTemplate>
                没有数据,<asp:LinkButton ID="adddata" runat="server" OnClick="addstore_Click">添加数据</asp:LinkButton> !
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:Panel ID="storePanel" CssClass="show" runat="server" Visible="false">
            入库编号:<asp:TextBox ID="Stoid" runat="server" ReadOnly="true"></asp:TextBox><br />
            进价:<asp:TextBox ID="PriceBox" runat="server">0</asp:TextBox><br />
		    数量:<asp:TextBox ID="AmountBox" runat="server" Columns="5">0</asp:TextBox><br />
		    <asp:LinkButton ID="Save" runat="server" OnClick="Save_Click">保存</asp:LinkButton> 
                <asp:LinkButton ID="Reset" runat="server" CausesValidation="False" OnClick="Reset_Click">取消</asp:LinkButton>
        </asp:Panel> 
    </asp:View>
</asp:MultiView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAllCatalogs"
        TypeName="XinBang.BLL.GoodsCatalogBL" DataObjectTypeName="XinBang.Entity.GoodsCatalog"></asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" TypeName="XinBang.BLL.StoreBL"
  SelectMethod="GetAllStoresByGooid" 
  DataObjectTypeName="XinBang.Entity.Store" >
    <SelectParameters>
        <asp:QueryStringParameter DefaultValue="0" Name="gooid" QueryStringField="gooid"
            Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
</asp:Content>